<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/utils/rem.js"></script>
    <link rel="stylesheet" href="https://at.alicdn.com/t/c/font_2124975_ogwnuct6mbe.css">
    <link rel="stylesheet" href="../css/public/hea.css">
    <link rel="stylesheet" href="../css/page/Modeldetails.css">
    <style>
        .sssss {
            height: 1rem;
        }

        .swiper-slide1 {
            font-size: 20px;
            height: calc(100vh);
            overflow-y: scroll;
        }
    </style>
</head>
<!-- 模特详情页 -->

<body>
    <div class="sssss"></div>
    <div class="swiper-wrapper ">
        <ul class="swiper-slide1">

        </ul>
    </div>
</body>
<script src="../js/config/index.js"></script>
<script src="../js/http/index.js"></script>
<script src="../js/serve/index.js"></script>
<script src="../js/utils/index.js"></script>

<script>
    class Modeldetails {
        constructor() {
            header("模特详情")
            this.Modeldetails()
        }
        indexs = 1
        async Modeldetails() {
            this.xunhuan()
            $(".swiper-slide1").onscroll = (v) => {
                const { clientHeight, scrollHeight, scrollTop } = $(".swiper-slide1");

                let distance = scrollHeight - scrollTop - clientHeight;
                console.log(distance)
                if (distance <= 3) {
                    if (this.indexs < this.inde - 1) {
                        console.log(1)
                        this.indexs += 1;
                        console.log("this.indexs"+this.indexs)
                        this.xunhuan()
                    } else {

                    }
                } else {

                }
            }
        }

        async xunhuan() {
            let re = await indexserve.modelList(
                {
                    id: query("id"),
                    page: this.indexs
                }
            )
            console.log(re.result)
            this.inde = re.result.total_page;
            item($(".swiper-slide1"), re.result.data,2)
            clicka(".swiper-wrapper ul li a", re.result.data,"detail.html")
            console.log("this.inde"+this.inde)
        }

        

    }
    new Modeldetails()
</script>

</html>